package com.qijian.production.domain.vo;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.production.domain.ScWorkOrder;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;

/**
 * 生产计划单对象
 *
 * @author zhangcheng
 * @date 2025-03-25
 */

@Data
@ToString
public class ScWorkOrderVo extends ScWorkOrder {
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty("工序id")
    private Long processId;

    @ApiModelProperty("工序名称")
    private String processName;

    @ApiModelProperty("工序顺序")
    private Integer sort;


    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty("上一道工序id")
    private Long afterProcessId;

    @ApiModelProperty("上一道工序名称")
    private String afterProcessName;

    @ApiModelProperty("上一道工序sort")
    private Integer afterSort;

    @ApiModelProperty("上一道工序配置的比例")
    private BigDecimal afterProportion;


    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty("最大工序id")
    private Long maxProcessId;

    @ApiModelProperty("最大工序名称")
    private String maxProcessName;

    @ApiModelProperty("最大工序sort")
    private Integer maxSort;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty("子级工单id")
    private Long childWorkOrderId;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty("子级工单成品料id")
    private Long childItemId;

    @ApiModelProperty("子级工单成品料编码")
    private String childItemCode;

    @ApiModelProperty("子级工单成品料名称")
    private String childItemName;

    @ApiModelProperty("子级工单配比")
    private BigDecimal childProportion;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty("需求原料Id")
    private Long needItemId;

    @ApiModelProperty("需求原料编码")
    private String needItemCode;

    @ApiModelProperty("需求原料名称")
    private String needItemName;

    @ApiModelProperty("需求原料配比")
    private BigDecimal needQty;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty("当前工单工序表id")
    private Long workOrderDetailId;

    @ApiModelProperty("bom定额")
    private BigDecimal workCost;

    @ApiModelProperty("本月生产总数")
    private BigDecimal monthProducedQty;

    @ApiModelProperty("合格数量")
    private BigDecimal sumFinishQty;

    @ApiModelProperty("不合格数量")
    private BigDecimal sumBadNumber;

    @ApiModelProperty("工单生产总数")
    private BigDecimal sumProducedQty;

    @ApiModelProperty("检验方案频次")
    private Long schemeFrequency;

    @ApiModelProperty("抽检比例")
    private BigDecimal samplingRatio;

    @ApiModelProperty("合格率")
    private BigDecimal passRate;

    @ApiModelProperty("检测时间")
    private String checkTime;

    @ApiModelProperty("检验状态")
    private String checkType;

    private String itemUnits;

    private String itemType;

    @ApiModelProperty("已经报工的数量")
    private BigDecimal producedQty;

    private List<String> allProcess;

    private String detailNo;

    private BigDecimal completionRate;

    @JsonSerialize(using= ToStringSerializer.class)
    private Long detailId;

}
